package com.umgsai.thread.thread03;

public class Thread1 extends Thread {
	private PublicVar publicVar;
	
	public Thread1(PublicVar publicVar) {
		super();
		this.publicVar = publicVar;
	}
	
	@Override
	public void run() {
		super.run();
		publicVar.setValue("b", "bb");
	}
	
	public static void main(String[] args) {
		try {
			PublicVar publicVar = new PublicVar();
			Thread1 t1 = new Thread1(publicVar);
			t1.start();
			Thread.sleep(500);
			publicVar.getValue();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
